#include<iostream>
#include<iomanip>
using namespace std;

int main()
{
    int n;
    cin >> n;
    double  sum = 0;
    int flag = 1;
    for(int i=1;i<=n;i++)
    {
        sum = (1/(double)i)*flag +sum;
        flag = flag*(-1);
    }
    cout << fixed << setprecision(4) << sum << endl;
    return 0;
}